|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jme3.app.state.AbstractAppState
furny.jme.appstate.RootNodeState
furny.jme.appstate.SimpleAppState
furny.swing.admin.viewer.ModelViewerState
public class ModelViewerState
App state for the model viewer.
| Nested Class Summary | |
|---|---|
private class |
ModelViewerState.ChaseCam2
Extended ChaseCamera that allows to set the zoom speed. |
| Nested classes/interfaces inherited from class furny.jme.appstate.SimpleAppState |
|---|
SimpleAppState.VIEWPORT |
| Field Summary | |
|---|---|
private com.jme3.scene.Node |
arrowNode
|
private com.jme3.scene.Node |
axisNode
|
private com.jme3.material.Material |
blueMaterial
|
private com.jme3.scene.Node |
camTarget
|
private ModelViewerState.ChaseCam2 |
chaseCam
|
private com.jme3.font.BitmapFont |
consoleFont
|
private java.text.NumberFormat |
floatFormat
|
private Furniture |
furniture
|
private com.jme3.material.Material |
greenMaterial
|
private boolean |
hasModel
|
private com.jme3.font.BitmapText |
infoText
|
private com.jme3.font.BitmapText |
infoText2
|
private com.jme3.font.BitmapText |
infoText3
|
private FurnyApplication |
mainApp
|
private boolean |
manual
|
private com.jme3.scene.Node |
modelNode
|
private IModelSource |
modelSource
|
private com.jme3.material.Material |
redMaterial
|
private boolean |
rotating
|
private com.jme3.scene.Node |
scaleGrid
|
private boolean |
showDirectionArrow
|
private boolean |
showGrid
|
private boolean |
showScaleGrid
|
private boolean |
showUserScaleGrid
|
private com.jme3.scene.Node |
userScaleGrid
|
| Fields inherited from class furny.jme.appstate.SimpleAppState |
|---|
app, assetManager, cam, context, createViewPort, flyCam, fpsText, guiFont, guiNode, guiViewPort, INPUT_MAPPING_CAMERA_POS, INPUT_MAPPING_EXIT, INPUT_MAPPING_MEMORY, inputManager, renderer, renderManager, secondCounter, settings, showSettings, statsView, viewPort |
| Fields inherited from class furny.jme.appstate.RootNodeState |
|---|
rootNode |
| Fields inherited from class com.jme3.app.state.AbstractAppState |
|---|
initialized |
| Constructor Summary | |
|---|---|
ModelViewerState(IModelSource modelSource,
FurnyApplication app)
Instantiates a new model viewer app state. |
|
| Method Summary | |
|---|---|
void |
arrangeText(int width,
int height)
Arrange the text. |
void |
centerFurniture(boolean save)
Centers the furniture. |
boolean |
isClosed()
Checks if the context is closed. |
boolean |
isRotating()
Checks if is rotating. |
boolean |
isShowDirection()
Checks if is showing direction. |
boolean |
isShowGrid()
Checks if is showing grid. |
boolean |
isShowScaleGrid()
Checks if is showing scale grid. |
boolean |
isShowUserScaleGrid()
Checks if is showing user scale grid. |
private void |
loadModel(int offset)
Load a model. |
static void |
main(java.lang.String[] args)
Main method to test the class. |
void |
rotateFurniture(float rotation,
boolean save)
Rotate furniture. |
void |
setFurniture(Furniture furn)
Method to set a furniture to view. |
void |
setRotating(boolean rotating)
Sets the rotating flag. |
void |
setShowDirection(boolean showDirectionArrow)
Sets the show direction flag. |
void |
setShowGrid(boolean show)
Sets the show grid flag. |
void |
setShowScaleGrid(boolean showScaleGrid)
Sets the show scale grid flag. |
void |
setShowUserScaleGrid(boolean showUserScaleGrid)
Sets the show user scale grid flag. |
void |
simpleInitAppState()
Simple initialization method. |
void |
simpleUpdate(float tpf)
Simple update method. |
| Methods inherited from class furny.jme.appstate.SimpleAppState |
|---|
getCamera, getFlyByCamera, getFpsText, getGuiNode, getGuiViewPort, getViewPort, initialize, isShowStatistics, setDisplayFps, setDisplayStatView, setOverrideSize, setShowStatistics, update |
| Methods inherited from class furny.jme.appstate.RootNodeState |
|---|
getRootNode |
| Methods inherited from class com.jme3.app.state.AbstractAppState |
|---|
cleanup, isEnabled, isInitialized, postRender, render, setEnabled, stateAttached, stateDetached |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface furny.swing.admin.viewer.IModelViewer |
|---|
isShowStatistics, setShowStatistics |
| Field Detail |
|---|
private final IModelSource modelSource
private ModelViewerState.ChaseCam2 chaseCam
private com.jme3.scene.Node camTarget
private com.jme3.scene.Node modelNode
private com.jme3.scene.Node axisNode
private com.jme3.scene.Node arrowNode
private com.jme3.scene.Node scaleGrid
private com.jme3.scene.Node userScaleGrid
private com.jme3.font.BitmapText infoText
private com.jme3.font.BitmapText infoText2
private com.jme3.font.BitmapText infoText3
private com.jme3.font.BitmapFont consoleFont
private com.jme3.material.Material redMaterial
private com.jme3.material.Material greenMaterial
private com.jme3.material.Material blueMaterial
private Furniture furniture
private boolean rotating
private boolean manual
private boolean showGrid
private boolean showScaleGrid
private boolean showUserScaleGrid
private boolean showDirectionArrow
private boolean hasModel
private final java.text.NumberFormat floatFormat
private final FurnyApplication mainApp
| Constructor Detail |
|---|
public ModelViewerState(IModelSource modelSource,
FurnyApplication app)
modelSource - the model sourceapp - the app| Method Detail |
|---|
public void simpleInitAppState()
SimpleAppState
simpleInitAppState in class SimpleAppStatepublic void setShowGrid(boolean show)
IModelViewer
setShowGrid in interface IModelViewershow - show gridpublic boolean isShowGrid()
IModelViewer
isShowGrid in interface IModelViewerpublic boolean isShowDirection()
IModelViewer
isShowDirection in interface IModelViewerpublic void setShowDirection(boolean showDirectionArrow)
IModelViewer
setShowDirection in interface IModelViewershowDirectionArrow - the new show direction flag.public boolean isRotating()
IModelViewer
isRotating in interface IModelViewerpublic void setRotating(boolean rotating)
IModelViewer
setRotating in interface IModelViewerrotating - the new rotating flagpublic boolean isClosed()
private void loadModel(int offset)
offset - the index offset of the model to load. (1 for next, -1 for
previous)public void setFurniture(Furniture furn)
IModelViewer
setFurniture in interface IModelViewerfurn - The furniture to view.public boolean isShowScaleGrid()
IModelViewer
isShowScaleGrid in interface IModelViewerpublic void setShowScaleGrid(boolean showScaleGrid)
IModelViewer
setShowScaleGrid in interface IModelViewershowScaleGrid - the new show scale grid flag.public boolean isShowUserScaleGrid()
IModelViewer
isShowUserScaleGrid in interface IModelViewerpublic void setShowUserScaleGrid(boolean showUserScaleGrid)
IModelViewer
setShowUserScaleGrid in interface IModelViewershowUserScaleGrid - the new show user scale grid flag.public void simpleUpdate(float tpf)
SimpleAppState
simpleUpdate in class SimpleAppStatetpf - Time per frame.public void centerFurniture(boolean save)
IModelViewer
centerFurniture in interface IModelViewersave - Save the change if true.
public void rotateFurniture(float rotation,
boolean save)
IModelViewer
rotateFurniture in interface IModelViewerrotation - the amount of rotation.save - Save the change if true.
public void arrangeText(int width,
int height)
IModelViewer
arrangeText in interface IModelViewerwidth - the width of the viewer.height - the height of the viewer.public static void main(java.lang.String[] args)
args - No arguments required.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||